package com.dao;

import com.util.DBpool.DBconnection;

import java.util.ArrayList;

public class DatasetDao {

    public static ArrayList<ArrayList<String>> load_all_data() {
        DBconnection connection = new DBconnection();
        connection.setSheet_name("Dataset_Info");
        ArrayList<String> table_list = new ArrayList<String>();
        return connection.getDataFromDB();
    }

    public static String getFilePathByName(String dataset_name) {
        DBconnection connection = new DBconnection();
        connection.setSheet_name("Dataset_Info");
        ArrayList<String> colByKeyword = connection.getColByKeyword(dataset_name, "Dataset_Info", "name", "filepath");
        if (colByKeyword.size() > 0)
            return colByKeyword.get(0);
        else
            return "";
    }
}
